package com.example.langchanin4jdemo1.controller;


import dev.langchain4j.community.model.dashscope.QwenChatModel;
import dev.langchain4j.model.chat.ChatLanguageModel;

public class HelloWorld {
    /**
     * QwenChatModel内置了api端点url  模型名称可以为：qwen-plus也可以切换为deepseek-r1
     * @param args
     */
    public static void main(String[] args) {
        ChatLanguageModel model = QwenChatModel.builder()
                .apiKey("sk-875dd6ef14244431acdc7ccb974f5bfe")
                .modelName("deepseek-r1")
                .build();
        String response = model.chat("你好，你是谁");
        System.out.println(response);
    }
}
